import xlrd


def read_excel(url):
    excel = xlrd.open_workbook('./data/test_params.xlsx', 'r', encoding_override='utf-8')
    sheets = excel.sheet_names()
    test_data = []
    for s in sheets:
        sheet = excel.sheet_by_name(s)
        for i in range(sheet.nrows):
            if i == 0:
                continue
            else:
                cmd = sheet.row_values(i)
                if cmd[1] != url:
                    continue
                # data_id, url, method, params, code, msg = cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], cmd[5]
                # print(data_id, url, method, params, code, msg)
            test_data.append(cmd)
    return test_data